Component({
  properties: {
    playerData: {
      type: Object,
      value: {
        userName: '',
        level: 1,
        coins: 0
      }
    },
    avatarUrl: {
      type: String,
      value: 'cloud://cloud1-5gn2jipsaa21f49d.636c-cloud1-5gn2jipsaa21f49d-1381622514/avatar-g.png'
    },
    coinIconUrl: {
      type: String,
      value: 'cloud://cloud1-5gn2jipsaa21f49d.636c-cloud1-5gn2jipsaa21f49d-1381622514/coin.png'
    }
  },

  data: {},

  methods: {
    // 点击头像
    onAvatarTap() {
      this.triggerEvent('avatarTap');
    },

    // 点击金币
    onCoinTap() {
      this.triggerEvent('coinTap');
    },

    // 点击等级
    onLevelTap() {
      this.triggerEvent('levelTap');
    }
  }
});